package com.mengxuegu.springcloud.service.impl;/*
 * @auther 顶风少年
 * @mail dfsn19970313@foxmail.com
 * @date 2019-10-25 07:52
 * @notify
 * @version 1.0
 */

import com.mengxuegu.springcloud.entities.Product;
import com.mengxuegu.springcloud.service.ProductClientService;
import org.springframework.stereotype.Component;

import java.util.List;

@Component //不要少了
public class ProductClientServiceFallBack implements ProductClientService {

    @Override
    public Product get(Long id) {

        Product p = new Product(id, "id=" + id + "无数据--feign&hystrix", "未连接到指定微服务");
        return p;
    }

    @Override
    public List<Product> list() {
        return null;
    }

    @Override
    public boolean add(Product product) {
        return false;
    }
}
